from tortoise import fields
from tortoise.models import Model


class Light(Model):
    ip = fields.CharField(pk=True, max_length=20, unique=True, null=False, description="IP地址")
    status = fields.CharField(max_length=128, null=False, description="状态")
    schedule = fields.IntField(max_length=128, description="正在运行的计划表序号")
    plan = fields.IntField(max_length=128, description="正在运行的方案表序号")
    light_num = fields.IntField(description="信号灯的数量")
